{% extends '@EduxBundle/layout/layout.html.twig' %}
{% block body_javascript %}
	{{ parent() }}
	{% if videoInfo and info['isOpen'] == 1 %}
		<script>
			var chatsdkAppID = {{ sdkAppID }};
var chatuuid = '{{ uuid }}';
var chatsign = '{{ sign }}';
var chatgroupId = '{{ groupId }}';
var playUrl = '{{ playUrl|raw }}';
		</script>
		{{ encore_entry_script_tags('edux_admin_teach_live_aliyun') }}
	{% else %}
		<script>
			var nowTimeY = {{ nowTimeY }};
var nowTimeM = {{ nowTimeM }};
var nowTimeD = {{ nowTimeD }};
var nowTimeH = {{ nowTimeH }};
var nowTimeI = {{ nowTimeI }};
var nowTimeS = {{ nowTimeS }};

var openTimeY = {{ openTimeY }};
var openTimeM = {{ openTimeM }};
var openTimeD = {{ openTimeD }};
var openTimeH = {{ openTimeH }};
var openTimeI = {{ openTimeI }};
var openTimeS = {{ openTimeS }};

var chatsdkAppID = '{{ sdkAppID }}';
var chatuuid = '{{ uuid }}';
var chatsign = '{{ sign }}';
var chatgroupId = '{{ groupId }}';
		</script>
		{{ encore_entry_script_tags('edux_admin_teach_chapter_live404') }}
	{% endif %}
{% endblock %}

{% block head_stylesheets %}
	{{ parent() }}
	{% if videoInfo and info['isOpen'] == 1 %}
		<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css"/>
		<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script>
		{# <script src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-vod-anti-min.js"></script> #}
		{{ encore_entry_link_tags('edux_admin_teach_live_aliyun') }}
	{% else %}
		{{ encore_entry_link_tags('edux_admin_teach_chapter_live404') }}
	{% endif %}


{% endblock %}

{% block page %}
	{{ parent() }}
	<div class="layui-main">
		{% if videoInfo %}
			{% if info['isOpen'] == 1 %}
				<div class="layui-show mt-20">
					<span class="layui-breadcrumb">
						<a href="javascript:;">{{ courseInfo['name'] }}</a>
						<a href="javascript:;">{{ info['name'] }}</a>
					</span>
				</div>
				<div class="layui-row mt-20">
					<div class="layui-col-md9">
						<!--视频播放区域-->
	<div id="playercontainer" class="playercontainer"></div>
					</div>
					<div class="layui-col-md3">
						<!-- 聊天区 -->
						{% include '@EduxBundle/teach/chapter/liveView/_live.leftmenu.html.twig' %}
					</div>
				</div>
			{% else %}
				{#直播404#}
				{% include '@EduxBundle/teach/chapter/liveView/live404.html.twig' %}
			{% endif %}
		{% else %}
			{#无视频#}
			{% include '@EduxBundle/teach/chapter/liveView/live404.html.twig' %}
		{% endif %}
	</div>
{% endblock %}
